Paper notebooks or agendas are still widely diffused for taking notes, despite the ever increasing use of mobile electronic devices. The latters are of practical use when short notes are to be taken with either a physical keyboard or a virtual keyboard displayed on a touchscreen, but the formers are largely preferred for recording hand-written notes or for sketching drawings. In order to transmit or store electronically these hand-written notes or drawings, they may be digitally acquired with a scanner or, more commonly, a picture of the hand-written paper pages is taken with a digital camera of a smartphone. Scanners may generate digital images of good quality because the pages with hand-writings to be scanned are placed to lie flat on the scanner screen, but scanners generally cannot be used as portable devices.
On the other side, pictures taken with a digital camera have a poor quality because it is very difficult to place the digital camera in a plane parallel to the plane of the paper pages, especially if two adjacent pages of a notebook or agenda are to be captured at the same time. Generally speaking, pictures taken in this way are affected by severe perspective distortions that should be corrected.
A method for compensating perspective distortion of objects depicted in a paper sheet taken with a digital camera is disclosed in the European patent application EP1947605. According to this prior document, upon the disclosure of which the preamble of claim 1 is drafted, the method processes an image of a rectangular sheet of paper, having boundary markers at the corners of the sheet, according to the following operations:
calculating the smallest rectangle that encloses all the boundary markers;
building a geometric transformation to map the locations of the boundary markers to corresponding locations of the rectangle;
transforming the captured image upon the geometric transformation.
This prior method does not allow to correct perspective distortions of a picture of a drawing sketched over two adjacent pages of a notebook or agenda. In this situation, the two adjacent pages typically do not lie on a same plane and the prior algorithm is unsatisfactory because either:
the two adjacent pages are taken together and the perspective distortion around the knuckle line of the two adjacent pages is left uncorrected; or
one page at the time is taken and hand-written notes or drawing extending over the two adjacent pages are not taken as a single picture.
There is still the need of an algorithm capable of correcting perspective distortion of pictures of two adjacent pages of a notebook or agenda containing hand-written notes or drawings extending over both pages.